Anatomical optimization of device and leads